<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        #app{
            text-align: center;
            width: 100%;
            height: 100%;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .wrap{
            list-style: none;
            width: 300px;
            border: 1px solid;
        }
        .wrap li{
            display: flex;
        }
        .wrap li span{flex: 1}
        .wrap li button{flex: 1}
    </style>
</head>
<body>
    <div id="app">

    </div>
</body>
<script src="../../js/vue.js"></script>
<script>

    var vm = new Vue({
        data:{msg:"xxx"}
    })
    vm.$mount("#app")


    //vue自定义事件
    vm.$once("damu",(flag)=>{console.log(flag)});
    vm.$on("damu",(flag)=>{console.log(flag)});
    setInterval(()=>{
        vm.$emit("damu",123)
    },2000)

</script>
</html>